{load header}
<!--/H-->
    <!-- 内容区 -->
    <div id="main-content">
        <div id="top-alert" class="fixed alert alert-error" style="display: none;">
            <button class="close fixed" style="margin-top: 4px;">&times;</button>
            <div class="alert-content">这是内容</div>
        </div>
        <div id="main" class="main">
            
            
	<div class="main-title">
        <h2>多融财富奖励发放</h2>
    </div>
            
    <div class="cf">
        <div style="float: left;">
                <input type="hidden" id="plat_en" value="{$plat_en}">
                <input type="file" id="upload_xls_cover_id" title="导入excel表"/>
                <script type="text/javascript" src="{eval echo base_url()}static/uploadify/jquery.uploadify.min.js"></script>
            </div>
        <i class="import-status-tip" style="line-height: 31px;margin-left: 8px;font-style: normal;color: #f39a00;">&nbsp;</i>
        <script type="text/javascript">
                    var obj_tip = $('.import-status-tip');
                    //上传文件
                    /* 初始化上传插件 */
                    $("#upload_xls_cover_id").uploadify({
                            "height"          : 33,
                            "swf"             : "{eval echo base_url()}static/uploadify/uploadify.swf",
                            "fileObjName"     : "excel",
                            "buttonText"      : "导入excel表",
                            "uploader"        : "{eval echo site_url('file/uploadxls')}",
                            "width"           : 120,
                            'removeTimeout'	  : 1,
                            'fileTypeExts'	  : '*.xls;',
                            "onUploadSuccess" : upload_seccess_callback,
                            'onFallback' : function() {
                                    alert('未检测到兼容版本的Flash.');
                            }
                    });
                    function upload_seccess_callback(file, data1){
                        var response = $.parseJSON(data1);
                        if(response.status == 1){
                            var FILE_URL = response.url;
                            var _Name_en = $('#plat_en').val();
                            obj_tip.html("正在导入数据...");
                            $.ajax({
                                url:"{eval echo site_url('plataward/import_duorongcf_award')}",
                                async: false,
                                dataType:"json",
                                type:"post",
                                data: {file_url:FILE_URL,name_en:_Name_en},
                                success:function(res){
                                    if(res.status == 1){
                                        obj_tip.html("导入失败");
                                        alert(res.error);
                                    }else{
                                        obj_tip.html(res.info);
                                    }
                                }
                            });
                        }else{
                            alert(response.info);
                        }
                    }
                </script>

	</div>
	
<!--F-->{load footer}